// 引入路由组件
const Home = () => import('@/pages/home/Home.vue')
const Login = () => import('@/pages/login/Login.vue')
const RegiSter = () => import('@/pages/register/Register.vue')
const Search = () => import('@/pages/search/Search.vue')
const Detail = () => import('@/pages/detail/index.vue')
const AddCart = () => import('@/pages/addCart/AddCart.vue')
const ShopCart = () => import('@/pages/shopCart/ShopCart.vue')



export default [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home',
    component: Home,
    meta: {
      show: true,
    }
  },
  {
    name: 'search',
    path: '/search/:keyword?',
    component: Search,
    meta: {
      show: true,
    }
  },
  {
    name:'login',
    path: '/login',
    component: Login,
    meta: {
      show: false,
    }
  },
  {
    name: 'regiSter',
    path: '/regiSter',
    component: RegiSter,
    meta: {
      show: false,
    }
  },
  {
    path: '/detail/:skuid',
    component: Detail,
    meta: {
      show: true,
    }
  },
  {
    name: 'addCartSuccess',
    path: '/addCartSuccess',
    component: AddCart,
    meta: {
      show: true,
    }
  },
  {
    path: '/shopCart',
    component: ShopCart,
    meta: {
      show: true,
    }
  },
]